/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: jse2204 - For4
 * <p>Powered by webrx On 2022-09-05 10:02:36
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class For4 {
    public static void main(String[] args) {
        //计算1+2+3+。。。+100 = ?
        int sum = 0;
        for (int i = 1; i <= 100; i++) {
            sum = sum + i;
        }
        System.out.printf("1+2+3+...+100 = %d%n", sum);
    }
}
